﻿using System;
using System.Collections;

namespace Com.CMS263.PO
{
    #region Survey

    /// <summary>
    /// Survey object for NHibernate mapped table 'Survey'.
    /// </summary>
    public class Survey
    {
        #region Member Variables

        protected int _id;
        protected string _business;
        protected string _contents;
        protected DateTime _addDate;

        #endregion

        #region Constructors

        public Survey() { }

        public Survey(string business, string contents, DateTime addDate)
        {
            this._business = business;
            this._contents = contents;
            this._addDate = addDate;
        }

        #endregion

        #region Public Properties

        public virtual int Id
        {
            get { return _id; }
            set { _id = value; }
        }

        public virtual string Business
        {
            get { return _business; }
            set
            {
                if (value != null && value.Length > 200)
                    throw new ArgumentOutOfRangeException("Invalid value for Business", value, value.ToString());
                _business = value;
            }
        }

        public virtual string Contents
        {
            get { return _contents; }
            set
            {
                if (value != null && value.Length > 500)
                    throw new ArgumentOutOfRangeException("Invalid value for Contents", value, value.ToString());
                _contents = value;
            }
        }

        public virtual DateTime AddDate
        {
            get { return _addDate; }
            set { _addDate = value; }
        }



        #endregion
    }
    #endregion
}